package com.zjitc.controller;

import com.zjitc.obj.User;
import org.omg.PortableInterceptor.USER_EXCEPTION;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/19 16:41
 * @description:
 */
@Controller
public class ParamController {
@RequestMapping("/param")
@ResponseBody
  public String parm1(@RequestParam(name = "name",required = false,defaultValue = "guo") String name,Integer age )
{
return "name"+name+"/age"+age;
}
@RequestMapping("/obj")
  @ResponseBody
  public String getUser(User user)
{
  return user.toString();
}
}
